(define (sort loi)
    (sort-aux `() loi)
)

(define (sort-aux l loi)
    (if (null? loi) 
        l
        (sort-aux (set-aux l (car loi)) (cdr loi))
    )
)

(define (set-aux loi i)
    (cond 
        ((null? loi) 
            (list i)
        )
        ((<= (car loi) i)
            (cons (car loi) (set-aux (cdr loi) i))
        )
        (else
            (cons i loi)
        )
    )
)

(display
    (sort `(8 2 5 2 3))
)
